﻿@model RechercheEmplois.Models.Postule

<h2>Postuler</h2>

<legend>Envoyer Email</legend>

<p>@using (@Html.BeginForm("Create", "Postuler", new { offreID =  ViewBag.OffreID }, FormMethod.Post, new { @id = "form1", @enctype = "multipart/form-data" }))
   {
       @Html.ValidationSummary() 
       <div class="form-horizontal">
           <div class="form-group">
               @Html.LabelFor(m => m.CV, new { @class = "col-md-2 control-label" })
               <div class="col-md-5">
                   <input name="fileCV" type="file" class="form-control" />
               </div>
           </div>
           <div class="form-group">
               @Html.LabelFor(m => m.LettreMotivation, new { @class = "col-md-2 control-label" })
               <div class="col-md-5">
                   <input name="fileLM" type="file" class="form-control"/>
               </div>
           </div>
           <div class="form-group">
               @Html.LabelFor(m => m.Commentaire, new { @class = "col-md-2 control-label" })
               <div class="col-md-5">
                   @Html.TextAreaFor(m => m.Commentaire, new { @class = "form-control", @rows=5 })
               </div>
           </div>
           <div class="form-group">
               <div class="col-md-offset-2 col-md-10">
                   <input type="submit" name="Submit" class="btn btn-primary" />
                   <div class="alert-danger">@ViewBag.Message</div>
               </div>
           </div>
       </div>
   }</p>

<div class="panel panel-success">
    <div class="panel-heading">@Html.ActionLink(@Model.Offre.Libelle, "Details", new { id = @Model.Offre.ID }, new { @class = "h5" })</div>
    <div class="panel-body">
        <dl class="dl-horizontal">
            <dt>Domaine</dt>
            <dd>@Html.DisplayFor(modelItem => @Model.Offre.Domaine.Libelle)</dd>
            <dt>Localtion</dt>
            <dd>@Html.DisplayFor(modelItem => @Model.Offre.Ville.Libelle)</dd>
            <dt>Job Type</dt>
            <dd>@Html.DisplayFor(modelItem => @Model.Offre.Type)</dd>
            <dt>Descriptions</dt>
            <dd>@Html.DisplayFor(modelItem => @Model.Offre.Description)</dd>
            <dt>Tags</dt>
            <dd>
                @foreach (var motcle in @Model.Offre.MotCles)
                {
                    <span class="label label-primary">@motcle.Libelle</span>
                }
            </dd>
        </dl>
    </div>
</div>

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
